package com.vote.entity;

import com.baomidou.mybatisplus.enums.IdType;
import com.baomidou.mybatisplus.annotations.TableId;
import com.baomidou.mybatisplus.activerecord.Model;
import java.io.Serializable;
import java.util.Date;


import com.baomidou.mybatisplus.annotations.Version;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import org.springframework.format.annotation.DateTimeFormat;

/**
 * <p>
 * 
 * </p>
 *
 * @author vote group
 * @since 2020-04-08
 */
@Data
@Accessors(chain = true)
public class Topic extends Model<Topic> {

    private static final long serialVersionUID = 1L;

    /**
     * 主题id
     */
    @TableId(value = "tid", type = IdType.AUTO)
    private Integer tid;

    private String theme;

    private String url;

    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date createdate;

    @Override
    protected Serializable pkVal() {
        return this.tid;
    }

}
